/**
 * 
 */
package org.jenkon.sql.utils;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

/**
 * @author Jens Konopka
 * 
 */
public final class SqlUtils {

	/**
	 * 
	 */
	private SqlUtils() {
	}

	/**
	 * @param connection
	 */
	public static void closeQuietly(final Connection connection) {
		if (connection != null) {
			try {
				connection.close();
			} catch (final SQLException e) {
			}
		}
	}

	/**
	 * @param statement
	 */
	public static void closeQuietly(final Statement statement) {
		if (statement != null) {
			try {
				statement.close();
			} catch (final SQLException e) {
			}
		}
	}

	/**
	 * @param resultSet
	 */
	public static void closeQuietly(final ResultSet resultSet) {
		if (resultSet != null) {
			try {
				resultSet.close();
			} catch (final SQLException e) {
			}
		}
	}

}
